export interface User {
  id: string
  username: string
  email: string
  role: 'STUDENT' | 'TEACHER' | 'ADMIN'
  profile: {
    firstName?: string
    lastName?: string
    avatar?: string
    bio?: string
    location?: string
  }
  createdAt: Date
  lastLoginAt?: Date
}

export interface Student extends User {
  role: 'STUDENT'
  enrolledCourses: string[]
  completedCourses: string[]
  learningProgress: {
    [courseId: string]: number // 课程学习进度 0-100
  }
}

export interface Teacher extends User {
  role: 'TEACHER'
  courses: string[]
  expertise: string[]
  qualifications?: string[]
}

export interface Admin extends User {
  role: 'ADMIN'
  permissions: string[]
}

export interface UserStatistics {
  totalUsers: number
  activeUsers: number
  newUsersToday: number
  usersByRole: {
    STUDENT: number
    TEACHER: number
    ADMIN: number
  }
}

export interface UserFilter {
  role?: 'STUDENT' | 'TEACHER' | 'ADMIN'
  status?: 'ACTIVE' | 'INACTIVE'
  searchQuery?: string
  page?: number
  pageSize?: number
}

export interface UserUpdateData {
  username?: string
  email?: string
  profile?: {
    firstName?: string
    lastName?: string
    avatar?: string
    bio?: string
    location?: string
  }
  password?: string
}
